<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<%@ include file="/WEB-INF/jsp/inc/taglibs.jsp"%>
		<%@ include file="/WEB-INF/jsp/inc/meta.jsp"%>
		<script>
			function changeDateStyle(obj){
				if(obj.value == 1){
					document.getElementById("startDate1").name = "" ;
					document.getElementById("endDate1").name = "" ;
					document.getElementById("startDate2").name = "startDate" ;
					document.getElementById("endDate2").name = "endDate" ;
					
					document.getElementById("startDate1").style.display = "none" ;
					document.getElementById("endDate1").style.display = "none" ;
					document.getElementById("startDate2").style.display = "" ;
					document.getElementById("endDate2").style.display = "" ;
				}else{
					document.getElementById("startDate1").name = "startDate" ;
					document.getElementById("endDate1").name = "endDate" ;
					document.getElementById("startDate2").name = "" ;
					document.getElementById("endDate2").name = "" ;
					
					document.getElementById("startDate1").style.display = "" ;
					document.getElementById("endDate1").style.display = "" ;
					document.getElementById("startDate2").style.display = "none" ;
					document.getElementById("endDate2").style.display = "none" ;
				}
			}
		</script>
	</head>
	<body style="background: #E8F5FE; padding: 15px 18px;" class="scroll_r">
				
		<div id="right_w">
			<p>
				当前位置：报建管理
			</p>
		</div>
		<form name="applyForm" action="${approot}/admin/apply/apply_inquiry" method="post">
		<table border="0" cellpadding="0" cellspacing="1" width="92%" align="center" id="add_tab">	
			<tr>
				<td>
					统计类型：<select name="inquiryType">
						<option value="0" <c:if test="${inquiryType == 0}">selected</c:if> >用户类型</option>
						<option value="1" <c:if test="${inquiryType == 1}">selected</c:if> >地址区域</option>
						<option value="2" <c:if test="${inquiryType == 2}">selected</c:if> >表型</option>
					</select>&nbsp;
					日期类型：<select name="dateType" onchange="changeDateStyle(this)">
						<option value="0" <c:if test="${dateType == 0}">selected</c:if> >年</option>
						<option value="1" <c:if test="${dateType == 1}">selected</c:if> >月</option>
					</select>&nbsp;
					时间：<input id="startDate1" <c:if test="${dateType == 1}">style="display:none"</c:if> <c:if test="${dateType == 0 || dateType == null}"> name="startDate" </c:if> class="Wdate" onclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy',alwaysUseStartDate:true})"/>
						&nbsp;&nbsp;<input id="endDate1" <c:if test="${dateType == 1}">style="display:none"</c:if> <c:if test="${dateType == 0 || dateType == null}"> name="endDate" </c:if> class="Wdate" onclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy',alwaysUseStartDate:true})"/>
						<input id="startDate2" <c:if test="${dateType == 0 || dateType == null}">style="display:none"</c:if> <c:if test="${dateType == 1}"> name="startDate"</c:if> class="Wdate" onclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM',alwaysUseStartDate:true})"/>
						&nbsp;&nbsp;<input id="endDate2" <c:if test="${dateType == 0 || dateType == null}">style="display:none"</c:if> <c:if test="${dateType == 1}"> name="endDate"</c:if> class="Wdate" onclick="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM',alwaysUseStartDate:true})"/>
					<input type="button" value="查 询" onclick="document.applyForm.submit();">
					<input type="button" value="报装申请" onclick="location.href='${approot}/admin/apply/apply_to_mod/add/0'">
				</td>
			</tr>
		</table>
		</form>
			<c:choose>
<c:when test="${fn:length(result)<1}">
<div align="center"><font color='red'>对不起,暂时没有找到符合条件的数据!</font></div>
</c:when>
<c:otherwise> 
				<table border="0" cellpadding="" cellspacing="1" align="center"
					width="92%" id="web_tab">
				<c:forEach var="row" items="${result}">
					<tr>
						<c:forEach var="value" items="${row}">
							<td>${value}</td>
						</c:forEach>
					</tr>
				</c:forEach>
				</table></c:otherwise>
</c:choose>
	</body>
</html>
